#pragma once

#include <vector>
#include "../Utils/BinPack.hpp"

namespace Logic {
	class TlogicBase {
	public:
		virtual void pack(BinPack::Packer& avValue) = 0;
		virtual void unPack(BinPack::unPacker& avValue) = 0;

		std::vector<uint8_t> serialize();

		template<class T>
		T deSerialize(std::vector<uint8_t> avData)
		{
			return BinPack::unpack<T>(avData);
		}
	};
}